layui.define([ 'form', 'laydate', 'table','coreTestdataApi'], function(exports) {
    var form = layui.form;
    var coreTestdataApi = layui.coreTestdataApi;
    var index = layui.index;
    var view = {
        init:function(){
	        Lib.initGenrealForm($("#updateForm"),form);
	        this.initSubmit();
        },
        initSubmit:function(){
            $("#updateButton").click(function(){
                layer.open({
                   type: 1
                   ,title: false //不显示标题栏
                   ,closeBtn: false
                   ,area: '300px;'
                   ,shade: 0.8
                   ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
                   ,btn: ['审核通过', '审核拒绝']
                   ,btnAlign: 'c'
                   ,moveType: 1 //拖拽模式，0或者1
                   ,content: '<div style="padding: 30px 10px;"><textarea id="remark" style="width:100%;height:200px" placeholder="请填写审核备注"></textarea></div>'
                   ,yes: function(){
                     approval(data.id,$("#remark").val(),layEvent === 'approval'?1:4);
                   }
                   ,btn2: function(){
                     approval(data.id,$("#remark").val(),layEvent === 'approval'?5:6);
                   }

                 });
            });
            $("#updateButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }
    }
    exports('edit',view);
});